﻿


using Microsoft.AspNetCore.Mvc;
using Web_swagger.Models;

namespace Web_swagger.Controllers
{
    [ApiController]
    [Route("api/[controller]")]
    public class UsersController : ControllerBase
    {
        [HttpPost]
        public IActionResult CreateUser(CreateUsersRequest request)
        {
            //如果模型验证失败 框架根本执行不到这
            return Ok($"用户 {request.username}创建成功！");
        }
    }
}
